Grid8

A = (4.11616354781287, 3.1650412818957605)
B = (4.495814119030288, 3.3364963785745947)
d_{AB} = Distance(A, B)
θ: atan(Slope[Line[A, B]])
m = 4 (slider from 0 to 10, step 1)
n = 3 (slider from 0 to 10, step 1)
a = Segment(A, B)
GridAllParallelABsegments = Sequence(Segment[(x(A) - n * d_{AB} * cos(θ) - i * d_{AB} * sin(θ), y(A) - n * d_{AB} * sin(θ) + i * d_{AB} * cos(θ)), (x(A) + n * d_{AB} * cos(θ) - i * d_{AB} * sin(θ), y(A) + n * d_{AB} * sin(θ) + i * d_{AB} * cos(θ))], i, -m, m)
GridAllPerpABsegments = Sequence(Segment[(x(A) + j * d_{AB} * cos(θ) - m * d_{AB} * sin(θ), y(A) + j * d_{AB} * sin(θ) + m * d_{AB} * cos(θ)), (x(A) + j * d_{AB} * cos(θ) + m * d_{AB} * sin(θ), y(A) + j * d_{AB} * sin(θ) - m * d_{AB} * cos(θ))], j, -n, n)